﻿@model string
@using HelperMethods.Infrastructure @*or include the reference in /Views/Web.config*@

@{
    Layout = null;
}

@*inline helper*@
@helper ListArrayItems(string[] items)
{
    <ul>
        @foreach (string str in items)
        {
            <li>@str </li>
        }
    </ul>
}

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
</head>
<body>
    <div>
        Here are the fruits: @ListArrayItems(ViewBag.Fruits) @*method 1*@
    </div>
    <div>
        Here are the cities: @Html.ListArrayItems((string[])ViewBag.Cities) @*method 2*@
    </div>
    <div>
        Here is the message:
        <p>@Model</p>
    </div>
</body>
</html>
